package com.serviceimpl;

import com.mapper.AccountMapper;
import com.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service("userService")
public class UserServiceImpl implements UserService {
    @Autowired
    AccountMapper accountMapper;
    @Transactional
    @Override
    public void zz(int outId, int inId, double money) {
        accountMapper.updateSubMoney(outId, money);
        System.out.println(1/0);
        accountMapper.updateAddMoney(inId, money);
    }
}
